package com.ruoyi.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.business.domain.BizScore;
import com.ruoyi.business.domain.BizUser;
import org.apache.ibatis.annotations.Select;

/**
 * <pre>
 *
 * </pre>
 *
 * @author zhangli
 * @since 2023/10/22
 */
public interface BizScoreMapper extends BaseMapper<BizScore> {

    @Select("select count(*) from (SELECT sum(task_score) as totalScore FROM biz_score group by user_number) as scoreTable where totalScore > #{score}")
    int selectTop(double score);

    @Select("select count(distinct(user_number)) from  biz_score ")
    int selectTotalPerson();
}
